package com.example.onlinereadingsystem.demos.web.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.onlinereadingsystem.demos.web.dto.domain.Chapter;
import com.example.onlinereadingsystem.demos.web.service.ChapterService;
import com.example.onlinereadingsystem.demos.web.mapper.ChapterMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 27935
 * @description 针对表【chapter】的数据库操作Service实现
 * @createDate 2024-10-09 11:25:09
 */
@Service
public class ChapterServiceImpl extends ServiceImpl<ChapterMapper, Chapter>
        implements ChapterService {
    /**
     * @auther ljm
     * @create 2024/11/14
     * @describe 根据小说id获取章节列表
     */
    @Override
    public List<Chapter> getChapterListByNovelId(String novelId) {
        return this.list(new LambdaQueryWrapper<Chapter>().eq(Chapter::getNovelId, novelId));
    }
}




